package cn.toolck.util;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletResponse;

public class CookieUtil {
    private CookieUtil() {

    }

    public static void createCookie(String key, String value, String path, HttpServletResponse response) {
        Cookie cookie = new Cookie(key, value);
        cookie.setPath(path);
        cookie.setMaxAge(60 * 30);
        response.addCookie(cookie);
    }
}
